<?php
namespace frontend\controllers;
use Yii;
use yii\base\InvalidParamException;
use yii\web\BadRequestHttpException;
use yii\web\Controller;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use common\models\KnowmapModel;
use frontend\models\KnowledgerelationForm;
class NormalController extends Controller{
    
    //标准图谱首页
    public function actionIndex()
    {
        $this->layout="layout2.php";
        return $this->render('index');
    }
    
    //学习路径
    public function actionStudyway()
    {
        $this->layout="layout2.php";
        return $this->render('studyway');
    }

        //标准图谱详情
    public function actionShow(){
        $this->layout="layout2.php";
//        $relateID="primaryMath1";//图谱名称
//        $model=new KnowledgerelationForm();
//        $data['mapshow']=$model->getRelationList($relateID);//获取关系列表，应该包含node 和 links
        return $this->render('show');
    }
    public function actionShow2()
    {
        $this->layout="layout2.php";
        return $this->render('show2');
    }
    
    public function actionMapinfo(){
        $this->layout="layout2.php";
        $model=new KnowmapModel();
        return $this->render('mapinfo',['model'=>$model]);
    }
    public function actionMapinfo2(){
        $this->layout="layout2.php";
        $model=new KnowmapModel();
        return $this->render('mapinfo2',['model'=>$model]);
    }
    public function actionMapinfo3(){
        $this->layout="layout2.php";
        $model=new KnowmapModel();
        return $this->render('mapinfo3',['model'=>$model]);
    }
    
    public function actionMapEdit(){
//        $model=new KnowmapModel();
        $this->layout="layout2.php";
        return $this->render('mapedit');
    }
    
    //与知识点相关的资源
    public function actionKnowres()
    {
        $this->layout="layout2.php";
        return $this->render('knowres');
    }
    
    public function actionKityminder()
    {
        $this->layout=false;
        return $this->render('kityminder');
    }
    
    //资源关联呈现
    public function actionKnowresshow()
    {
        $this->layout="layout2.php";
        return $this->render('knowresshow');
    }
    
    //与知识点关联的资源详情
    public function actionResshow()
    {
        $this->layout="layout2.php";
        return $this->render('reshow');
    }
}

